home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-07-18 | 1.1 KB | 29 lines | [TEXT/GEOL] |
- Item 5023232 14-July-89 16:41
-
- From: BURBECK.S Burbeck, Steve
-
- To: KORNHER Scarab Research, C Kornher, PRT
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Re: Re GC Hacks
-
- Chris,
-
- If the object contains no references to other objects, deep and shallow cloning
- are the same. Otherwise, the semantics of deep versus shallow cloning are
- different. Shallow cloning proliferates references to objects (which is easy
- to handle with automatic GC and difficult with manual GC), whereas deep cloning
- proliferates objects. So, on the face of it, deep cloning would seem to be
- more compatible with manual GC. Despite that, I don't know of a case where
- automatic deep cloning is the default. In Smalltalk and MacApp and C++, the
- default is shallowClone. Presumably most MacApp programmers only use shallow
- clone when objects contain no other object references.
-
- As you imply, only the programmer can know, on a case by case basis, whether
- she wants recursive cloning or only a clone of the top level (or sometimes
- something in between).
-
- Steve burbeck
-
-